# -- coding: utf-8 --
import time
from selenium.webdriver import ActionChains
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait

driver = webdriver.Firefox()
driver.get('https://www.baidu.com')
driver.maximize_window()#最大化
time.sleep(2)

ActionChains(driver).move_to_element(driver.find_element_by_xpath("//div[@id='u1']/span[1]")).perform()
down_data_click = WebDriverWait(driver, 5).until(
    EC.element_to_be_clickable((By.XPATH, "//div[@class='s-user-setting-pfmenu']/a[2]"))
)
time.sleep(2)
down_data_click.click()